package Test.List;

import java.util.ArrayList;

public class Test {
    public static void main1(String[] args) {
        ArrayList<Integer> list=new ArrayList<>();
        list.add(10);
        list.add(11);
        list.add(12);
        list.add(1,9999);
        //list.clear();
        System.out.println(list);

        ArrayList<String> list111=new ArrayList<>();
        ArrayList<Integer> list2=new ArrayList<>(list);
        list2.add(9999999);

        System.out.println(list2);
    }

    public static void main(String[] args) {
        MyArrayList myArrayList=new MyArrayList();
        myArrayList.add(1);
        myArrayList.add(2);
        myArrayList.add(3);
        myArrayList.add(4);
        myArrayList.add(5);

//        System.out.println(myArrayList.get(1));//
        myArrayList.add(2,9);
//      myArrayList.add(2,115);
//      myArrayList.add(6,999);

        myArrayList.display();
    }

    public static void main3(String[] args) {
        MyArrayList myArrayList=new MyArrayList();

        IList list=new MyArrayList();

        System.out.println(list.size());
        System.out.println(myArrayList.size());

        System.out.println("======");
        list.display();
        myArrayList.display();
    }
}

